package com.talent.common;

import org.apache.commons.lang3.time.DateFormatUtils;

import java.util.Calendar;
import java.util.Date;

/**
 * @ClassName：Test
 * @Author: hszhou
 * @Date: 2024/12/9 9:41
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
public class Test {

    public static void main(String[] args) {


        Date now = new Date();
        Calendar c = Calendar.getInstance();
        c.setTime(now);
        c.add(Calendar.DAY_OF_MONTH, -1);
        String dataDateStr = DateFormatUtils.format(c.getTime(), "yyyy-MM-dd");
        System.out.println(dataDateStr);
    }
}
